/*
 * @Description: 附件model
 * @Version: V1.0.0
 * @Author: 黄鑫
 * @Date: 2025-05-06
 * @LastEditors: 黄鑫
 * @LastEditTime: 2025-05-06
 * @FilePath: AttachmentModel.dart
 * @Remarks: 
 */
class AttachmentModel {
  int? attachmentType;
  int? fromType;
  String? fileID;
  String? sourceID;
  String? commentID;
  String? docVersionID;
  String? accountId;
  String? createUserName;
  String? createUserAvatar;
  String? originalFilename;
  String? ext;
  int? filesize;
  String? appID;
  String? createTime;
  String? updateTime;
  String? thumbnailName;
  String? thumbnailPath;
  String? middleName;
  String? middlePath;
  String? largeThumbnailName;
  String? largeThumbnailPath;
  String? filename;
  String? filepath;
  String? viewUrl;
  String? previewUrl;
  int? viewType;
  String? allowDown;
  String? downloadUrl;
  String? waterMarkInfo;

  AttachmentModel(
      {attachmentType,
      fromType,
      fileID,
      sourceID,
      commentID,
      docVersionID,
      accountId,
      createUserName,
      createUserAvatar,
      originalFilename,
      ext,
      filesize,
      appID,
      createTime,
      updateTime,
      thumbnailName,
      thumbnailPath,
      middleName,
      middlePath,
      largeThumbnailName,
      largeThumbnailPath,
      filename,
      filepath,
      viewUrl,
      previewUrl,
      viewType,
      allowDown,
      downloadUrl,
      waterMarkInfo});

  AttachmentModel.fromJson(Map<String, dynamic> json) {
    attachmentType = json['attachmentType'];
    fromType = json['fromType'];
    fileID = json['fileID'];
    sourceID = json['sourceID'];
    commentID = json['commentID'];
    docVersionID = json['docVersionID'];
    accountId = json['accountId'];
    createUserName = json['createUserName'];
    createUserAvatar = json['createUserAvatar'];
    originalFilename = json['originalFilename'];
    ext = json['ext'];
    filesize = json['filesize'];
    appID = json['appID'];
    createTime = json['createTime'];
    updateTime = json['updateTime'];
    thumbnailName = json['thumbnailName'];
    thumbnailPath = json['thumbnailPath'];
    middleName = json['middleName'];
    middlePath = json['middlePath'];
    largeThumbnailName = json['largeThumbnailName'];
    largeThumbnailPath = json['largeThumbnailPath'];
    filename = json['filename'];
    filepath = json['filepath'];
    viewUrl = json['viewUrl'];
    previewUrl = json['previewUrl'];
    viewType = json['viewType'];
    allowDown = json['allowDown'];
    downloadUrl = json['downloadUrl'];
    waterMarkInfo = json['waterMarkInfo'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['attachmentType'] = attachmentType;
    data['fromType'] = fromType;
    data['fileID'] = fileID;
    data['sourceID'] = sourceID;
    data['commentID'] = commentID;
    data['docVersionID'] = docVersionID;
    data['accountId'] = accountId;
    data['createUserName'] = createUserName;
    data['createUserAvatar'] = createUserAvatar;
    data['originalFilename'] = originalFilename;
    data['ext'] = ext;
    data['filesize'] = filesize;
    data['appID'] = appID;
    data['createTime'] = createTime;
    data['updateTime'] = updateTime;
    data['thumbnailName'] = thumbnailName;
    data['thumbnailPath'] = thumbnailPath;
    data['middleName'] = middleName;
    data['middlePath'] = middlePath;
    data['largeThumbnailName'] = largeThumbnailName;
    data['largeThumbnailPath'] = largeThumbnailPath;
    data['filename'] = filename;
    data['filepath'] = filepath;
    data['viewUrl'] = viewUrl;
    data['previewUrl'] = previewUrl;
    data['viewType'] = viewType;
    data['allowDown'] = allowDown;
    data['downloadUrl'] = downloadUrl;
    data['waterMarkInfo'] = waterMarkInfo;
    return data;
  }
}
